package com.example.demo.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.demo.entity.BookType;
import com.example.demo.mapper.BookTypeMapper;
import com.example.demo.service.BookTypeService;

@Service
public class BookTypeServiceImpl implements BookTypeService {

  @Autowired
  private BookTypeMapper bookTypeMapper;

  @Override
  public boolean add(BookType bookType) {
    return bookTypeMapper.add(bookType) > 0;
  }

  @Override
  public boolean delete(int id) {
    return bookTypeMapper.delete(id) > 0;
  }

  @Override
  public BookType[] getAll() {
    return bookTypeMapper.getAll();
  }

}
